const Home = ()=> import('@/views/home/home.vue')
const CarShop = ()=> import('@/views/carShop/carshop.vue')
const Mine = ()=> import('@/views/mine/mine.vue')
const Brands = ()=>import('@/views/brands/brand.vue')
const ClassIfy = ()=>import('@/views/classify/classify.vue')
const CarOnMarket = ()=>import('@/views/carOnMarket/carMarket.vue')
const CarDiscount = ()=>import('@/views/carDiscount/carDiscount.vue')
const ColumnInfo = ()=>import('@/views/columnInfo/columninfo.vue')
const VideoDetails = ()=>import('@/views/videoDetails/videodetails.vue')
const Register = ()=>import('@/views/register/register.vue')

const tabBar =()=> import('@/components/tabBar.vue')
const navBar =()=> import('@/components/navBar.vue')
const SubnavBar =()=> import('@/components/subnavBar.vue')
const RegNav =()=> import('@/components/reg-nav.vue')
const routes = [
  {
      path:'/',
      redirect:'/home',
  },
  {
      path:'/home',
      components:{
        header:navBar,
        default:Home,
        footer:tabBar
      },
  },
  {
    path:'/carShop',
    components:{
      header:navBar,
      default:CarShop,
      footer:tabBar
    },
  },
  {
    path:'/mine',
    components:{
      header:navBar,
      default:Mine,
      footer:tabBar
    },
  },
  {
    path:'/brands',
    components:{
      header:SubnavBar,
      default:Brands,
    },
    meta:{
      title:'品牌'
    }
  },
  {
    path:'/classify',
    components:{
      header:SubnavBar,
      default:ClassIfy,
    },
    meta:{
      title:'条件选车'
    }
  },
  {
    path:'/caronmarket',
    components:{
      header:SubnavBar,
      default:CarOnMarket,
    },
    meta:{
      title:'新车上市'
    }
  },
  {
    path:'/cardiscount',
    components:{
      header:SubnavBar,
      default:CarDiscount,
    },
    meta:{
      title:'新车特惠'
    }
  },
  {
    path:'/columninfo',
    components:{
      header:SubnavBar,
      default:ColumnInfo,
    },
    meta:{
      title:'E路向前'
    }
  },
  {
    path:'/videodetails',
    components:{
      header:SubnavBar,
      default:VideoDetails,
    },
    meta:{
      title:'视频详情'
    }
  },
  {
    path:'/register',
    components:{
      header:RegNav,
      default:Register,
    },
  }
  
]
export default routes